package com.cin.cma.server.pos.controller;

import com.cin.cma.common.model.ApiResponse;
import com.cin.cma.common.model.finixx.base.BaseRequest;
import com.cin.cma.common.model.finixx.response.DataInfSoftwateVersionResponse;
import com.cin.cma.server.pos.service.IDataInfService;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 *
 * @Date：2024/7/19 18:22
 */
@RestController
@RequestMapping("dataInf")

public class DataInfController {
    @Autowired
    private IDataInfService dataInfService;

    /**
     * 获取软件版本
     *
     * @param model
     * @return
     */
    @ResponseBody
    @PostMapping("getSoftwareVersion")

    public ApiResponse<DataInfSoftwateVersionResponse> getSoftwareVersion(@RequestBody @Valid BaseRequest model) throws Exception {
        return ApiResponse.success(dataInfService.getSoftwareVersion(model));
    }

}
